package com.example.guiguihomemedical.controller;

import com.example.guiguihomemedical.common.Result;
import com.example.guiguihomemedical.entity.dto.RecordList;
import com.example.guiguihomemedical.entity.dto.RecordSearch;
import com.example.guiguihomemedical.service.RecordSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("recordsearch")
public class RecordSearchController {
    @Autowired
    private RecordSearchService recordSearchService;
    @PostMapping
    public Result SearchRecord(@RequestBody RecordSearch recordSearch){
        List<RecordList> recordList= recordSearchService.searchRecord(recordSearch);
        return Result.success(recordList);
    }
}
